import { createRouter, createWebHistory } from 'vue-router'


import Login from '@/views/login/login.vue'
import Layout from '@/views/layout/layout.vue'
import usermanage from '@/views/usermanage/usermanage.vue'
import classmanage from '@/views/classmanage/classmanage.vue'
import A from '@/views/a.vue'
import Supplier from '@/views/supplier/supplier.vue'
import Shop from '@/views/shop/shop.vue'
import ShopAdd from '@/views/shop/add.vue'
import Notify from '@/views/notify/notify.vue'
import WarehouseManage from '@/views/warehouseManage/index.vue'
import LogisticsCompany from '@/views/loglist/logisticsCompany.vue'
import LogisticsPrice from '@/views/loglist/logisticsPrice.vue'
import Received from '@/views/received/index.vue'
import ownerView from '@/views/owner/index.vue'




const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: Layout,
      children: [
        {
          path: '',
          redirect: '/usermanage'
        }, {
          path: '/usermanage',
          name: 'usermanage',
          component: usermanage
        },
        {
          path: '/classmanage',
          name: 'classmanage',
          component: classmanage
        }, {
          path: '/a',
          name: 'a',
          component: A
        }, {
          path: '/suppliermanage',
          name: 'suppliermanage',
          component: Supplier
        }
        , {
          path: '/shopmanage',
          name: 'shopmanage',
          component: Shop
        }, {
          path: '/shopadd',
          name: 'shopadd',
          component: ShopAdd
        },{
          path: '/notify',
          name: 'notify',
          component: Notify

        },{
          path: '/warehouseManage',
          name: 'warehouseManage',
          component: WarehouseManage
        },{
          path: '/logisticsCompany',
          name: 'logisticsCompany',
          component: LogisticsCompany
        },{
          path: '/logisticsPrice',
          name: 'logisticsPrice',
          component: LogisticsPrice
        },{
          path: '/received',
          name: 'received',
          component: Received
        },
        {path: '/owner', name: 'owner', component: ownerView},



      ]
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    }


  ]
})

export default router
